In a die-sinking electric-discharge machining device, machining can be made unstable due to electric discharge concentration that occurs earlier than a response time of electrode feed (an arc state), thereby causing arc traces on a workpiece. When arc traces are produced, surface roughness and shape accuracy are degraded. Conventionally, in order to avoid this phenomenon, an electric discharging state between a machining electrode and a workpiece is determined to control machining conditions according to the electric discharging state. For example, Patent Literature 1 discloses a technique in which the discharging state is classified into the state of a normal electric discharge and the state of an abnormal electric discharge (hereinafter just referred to as “normal electric discharge and abnormal electric discharge”), and when abnormal electric discharge is detected, machining condition setting is changed.
In order to classify an electric discharging state into normal electric discharge and abnormal electric discharge, it is necessary to obtain a boundary between normal electric discharge and abnormal electric discharge (hereinafter, simply also “boundary”) in advance. Conventionally, the boundary is obtained by an operation that requires a worker's technical knowledge. A fluctuation in boundary setting occurs among workers, and therefore there is a problem that a potential degradation of machining performance exists. Furthermore, generally, it is assumed that the boundary is obtained in a state where many abnormal electric discharges are included, and therefore there is also a problem that a possibility of damaging a machining electrode and a workpiece exists.